Wavefront sensor and method of reconstructing distorted wavefronts

ABSTRACT

A wavefront sensor includes a mask and a sensor utilized to capture a diffraction pattern generated by light incident to the mask. A reference image is captured in response to a plane wavefront incident on the mask, and another measurement image is captured in response to a distorted wavefront incident on the mask. The distorted wavefront is reconstructed based on differences between the reference image and the measurement image.

TECHNICAL FIELD

The present disclosure is related generally to wavefront sensors, and inparticular to modulated wavefront sensors.

BACKGROUND

A wavefront sensor is a device utilized to measure aberrations in anoptical wavefront. Wavefront sensors are utilized in a number ofapplications, including in fields of adaptive optics, ophthalmology,etc. For example, an adaptive optics device measures the aberrations inthe optical wavefront and then corrects the aberrations such that thelight provided to a measuring device (e.g., telescope) is collimated.

Current wavefront sensors are typically described as a Shack-Hartmanntype sensor, which is a first-order method utilized to detect wavefrontslopes, and a curvature sensing type, which is a second order method.With respect to the Shack-Hartman wavefront sensor, this type ofwavefront sensor utilizes an array of lenses that focus an incomingwavefront onto a sensor—such as a CCD array or CMOS array sensor. If thewavefront is planar (i.e., does not have any aberrations) then the spotsor points of light focused by each lenslet show no displacement, i.e.the spots locate at the center. If the wavefront is not planar, then thelocal slope of the wavefront at each particular lenslet results in aproportional displacement of the spot focused on the sensor, compared tothe spots of planar wavefront.

However, the Shack-Hartmann type wavefront sensor suffers from severaldrawbacks, including poor resolution, and poor pixel utilization. Forexample, the resolution of the Shack-Hartmann type wavefront sensor islargely dependent on the number of lenslets in the microlens array. Themaximum wavefront resolution depends on the number of lenslets in themicrolens array, and its sampling period is the inverse of the spacingbetween two neighboring lenslets, which prevents high resolutionwavefront slope detection. Therefore, it would be beneficial tointroduce a wavefront sensor that cures these deficiencies.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 a block diagram of a Coded Shack-Hartmann (CSH) wavefront sensoraccording to an embodiment of the present invention.

FIGS. 2a and 2b are block diagrams illustrating steps utilized tocalibrate and utilize the CSH wavefront sensor according to anembodiment of the present invention.

FIG. 3 illustrates the capture of a planar/reference wavefront image, adistorted/measurement wavefront image, and the difference between thereference wavefront image and the measurement wavefront image.

FIG. 4 illustrate fabrication of the mask (a binary one, in this case)utilized by the wavefront sensor according to an embodiment of thepresent invention.

FIG. 5 is a graph indicating how proximal parameter λ affectsconvergence of the algorithm according to an embodiment of the presentinvention.

FIG. 6 are graphs that illustrate the accuracy of the CSH wavefrontsensor according to an embodiment of the present invention.

DETAILED DESCRIPTION

The present invention provides a wavefront sensor utilized to measurethe phase of distorted wavefronts. In one embodiment, the wavefrontsensor—described herein as a Coded Shack-Hartmann (CSH) wavefrontsensor—utilizes a foreground mask that modulates the incoming wavefrontat diffraction scale. The resulting wavefront information is encoded inthe diffraction pattern, and is numerically decoded by a wavefrontreconstruction algorithm that relies on a simple optimization method. Inthis way, the CSH wavefront sensor provides higher pixel utilization,full sensor resolution wavefront reconstruction, and efficient parallelcomputation and real-time performance as compared with traditionalwavefront sensors such as the traditional Shack-Hartmann wavefrontsensor.

FIG. 1 is a block diagram of CSH wavefront sensor 100 according to anembodiment of the present invention. CSH wavefront sensor 100 includes amask 102, sensor 104, and processing system 106, which includesmicroprocessor 108 and memory 110. Mask 102 is located in the foregroundwith respect to sensor 104, separated by a distance

. In one embodiment, mask 102 is a uniform random binary mask, andsensor 104 is a monochromatic sensor. In addition, the distance

is small; for example, in one embodiment the distance

may be set equal to approximately 1.6 millimeters (mm) However, in otherembodiments, depending on the application the distance z may be selectedwithin a wide range of distances to create the desired diffractionpattern (e.g., tenths of millimeters to centimeters).

The location of mask 102 modulates the incoming wavefront, whose localslopes are encoded as local movements of the diffraction pattern, whichis then captured by sensor 104. In the embodiment shown in FIG. 1, auniform random binary mask is utilized to modulate the incomingwavefront. However, in other embodiments, other types of masks may beutilized such as a non-uniform random, gray scale mask, a diffuser, or awavelength--dependent mask, each capable of modulating the incominglight. For example, a non-uniform random mask may be utilized to createa specific diffraction pattern onto sensor 104. In still otherembodiments, the type and or distance z the mask 102 is placed from thesensor 104 may depend on the wavelength of the light being captured. Thecaptured image is a result of how the distorted wavefront is diffractedthrough the mask 102, and is provided to processing system 106 forprocessing. As described in more detail with respect to FIGS. 2a and 2b, measurement of the distorted wavefront requires first capturing thediffraction pattern of a planar wavefront which is utilized as acalibration or reference image. Subsequently, the diffraction pattern ofa distorted wavefront is captured—designated as a measurement image.Given the reference image and the measurement image—the image pair, fromwhich the local slope information of the distorted wavefront isnumerically decoded.

In one embodiment, the accuracy of the CSH wavefront sensor isdependent, at least in part, on the distinctive diffraction patterngenerated among neighbors, which in turn is determined in general by themask 102 utilized, and the setup distance

as well. However, the requirement for distinctiveness over neighborsmust be weighed against practical issues of light-efficiency andfabrication easiness. In one embodiment, mask 102 utilizes a uniformlyrandom pattern. However, in other embodiments the mask may be optimizedto satisfy the distinctiveness requirements while maintaining therequired light-efficiency and fabrication requirements. Also, in otherembodiments the mask need not be binary, for example a greyscale mask,or a colored mask that is capable for wavelength-variant amplitudemodulation, for the sake of specific applications.

In one embodiment, the distance

is dependent on specific requirement. If the distance

is too small, this results in a small diffraction of the mask, and thusweakens the distinctiveness between neighbors. This is best illustratedvia a hypothetical in which the distance

is reduced to zero, in which case the captured image is always equal tothe mask pattern itself. In addition, if the distance

is too small, then the warped displacement flow z∇ϕ(r) becomes too smalland is non-sensible by the Horn-Schunck intensity preserving assumption,and is more vulnerable to the sensor pixel noise and quantization error.In contrast, a large

value makes the CSH wavefront sensor physically bulky, and morediffractive is the unknown wavefront scalar field. This weakens ourbasic assumption that the unknown wavefront phase is of low-diffraction.Further, large

value also enhances the diffraction of mask 102, and possibly leads to alow contrast diffraction pattern and thus weakens the distinctivenessbetween neighbors as well, consequently impair the wavefront sensingability of the CSH.

FIGS. 2a and 2b are block diagrams illustrating steps utilized tocalibrate and utilize the CSH wavefront sensor according to anembodiment of the present invention. FIG. 2a illustrates the calibrationstep, in Which planar wavefront 200 is provided to CSH wavefront sensor100 to allow for the capturing of a reference image. In one embodimentthe captured reference image is stored to memory 110. In one embodiment,the illumination source utilized to generate the planar wavefront is acollimated source. Once the reference image has been captured, CSHwavefront sensor 100 is ready to be utilized. An example of a capturedreference image is illustrated in FIG. 3a , below.

FIG. 2b illustrates the measurement step, in which distorted wavefront202 is provided to CSH wavefront sensor 100 to allow for the capturingof a measurement image. As discussed above, mask 102 is interpreted asmodulating the incoming distorted wavefront 202. After propagatingthrough a small distance

, the wavefront is encoded and then captured by sensor 104. Once again,in one embodiment the captured reference image is also stored to memory110. Having captured the measurement image, processing system 106compares the diffraction pattern of the reference image with thediffraction pattern of the measurement image. As discussed in moredetail below, microprocessor 108 (shown in FIG. 1) utilized to comparethe diffraction patterns may be implemented with a central processingunit (CPU) or a graphical processing unit (GPU). The GPU providesparallelism benefits over the CPU, and therefore may provide shorterexecution times than the CPU. The measured difference between the twoimages results in sub-pixel shifting, which indicates the changes oflocal slopes. A benefit of this approach is that the measurement isindependent of wavelength, so white incoherent illumination issufficient and no coherent lights are needed.

The following derivation is provided to illustrate the feasibility ofthe above-identified CSH wavefront sensor. Consider a general scalarfield

₀(r) (coordinate r=[x y]T) with wave number k=2π/λ at the mask position:

₀(r)=

₀(r)f ₀(r ),   (1)where

₀(r) is the mask amplitude function (with sharp boundaries),f₀(r)=exp[jϕ(r)] is the scalar field with the distorted wavefront ϕ(r)representing the value to be measured. To simplify, the followingassumptions are relied upon:

-   -   Mask        ₀(r) is of high frequency (and uniformly random binary), whose        Fourier transform P₀(        ) (where        is the Fourier dual of r) is broadband.    -   Distorted scalar field f₀(r) is smooth enough such that its        spectrum is bandlimited, and decays sufficiently enough to zero        in high frequency regions. The wavefront ϕ(r) is of        low-frequency, and is first-order differentiable.

Assuming the mask 102 is placed close to sensor 104 (shown in FIG. 1)(e.g., distance

≈3 mm), that the Huygens-Fresnel based principle is relied upon. Using acompact form of Rayleigh-Sommerfeld diffraction formula, and expandedinto the Fourier domain, the diffractive scalar field may be expressedas follows:

$\begin{matrix}{{u_{z}(r)} = {{{\exp\left\lbrack {{jkz}\left( {1 + \frac{\nabla^{2}}{k^{2}}} \right)}^{1/2} \right\rbrack}{u_{0}(r)}} \approx {\int{{\exp\left( {j\; 2\;\pi\; r^{T}\rho} \right)}{\exp\left\lbrack {{jkz}\left( {1 - {\lambda^{2}{\rho }_{2}^{2}}} \right)}^{1/2} \right\rbrack}{P_{0}(\rho)} \times {\exp\left( {- {jkz}} \right)}{\exp\left\lbrack {{jkz}\left( {1 + \frac{\nabla^{2}}{k}} \right)}^{1/2} \right\rbrack}{f_{0}\left( {r - {\lambda\; z\;\rho}} \right)}d\;\rho}}}} & (2)\end{matrix}$Equation (2) may be further simplified by ignoring the diffraction ofscalar field f₀(r−λ

). This is appropriate for the following reasons: (i) the distance

is small, and the diffraction effect is not obvious, and (ii) distortedscalar field f₀(r−λ

) is smooth and its spectrum decays sufficiently fast, so its Laplacianmatrix exponential expansion is very small and negligible as well.Consequently, the following approximation can be relied upon:

$\begin{matrix}{{\exp\left\lbrack {{jkz}\left( {1 + \frac{\nabla^{2}}{k^{2}}} \right)}^{1/2} \right\rbrack} \approx {\exp({jkz})}} & (3)\end{matrix}$Subsequently, scalar field f₀(r−λ

) may be approximated by imposing Taylor expansion and linearizing ϕ(r−λ

) around r, which yields:

$\begin{matrix}{{f_{0}\left( {r - {\lambda\; z\;\rho}} \right)} \approx {{\exp\left\lbrack {j\;{\phi(r)}} \right\rbrack}{{\exp\left\lbrack {{- j}\; 2\;\pi\frac{z}{k}\rho^{T}{\nabla{\phi(r)}}} \right\rbrack}.}}} & (4)\end{matrix}$

With these approximations, Eq. (2) can be simplified as:

$\begin{matrix}{{u_{z}(r)} = {{\exp\left\lbrack {j\;{\phi(r)}} \right\rbrack}{p_{z}\left( {r - {\frac{z}{k}{\nabla{\phi(r)}}}} \right)}}} & (5)\end{matrix}$where p

(r−(

/k)∇ϕ(r)) is the propagated diffractive scalar field of a linearlydistorted mask p₀(r−(

/k)∇ϕ(r)), predicted by the strict Rayleigh-Sommerfeld diffractionformula. It is worth noting that as indicated by Equation (5), indispersion-negligible materials, ϕ(r)=ko(r) thus the resultant intensityis irrelevant to wave number k, indicating the possibility of usingincoherent illumination for optical path measurements. In followingcontents no distinction is made between optical path and wavefront, andas a result

${o(r)} = {{\frac{1}{k}{\phi(r)}} = {{\phi(r)}.}}$

CSH wavefront sensor is based on result provided by Eq. (5). Thereference image is captured under collimated illumination (i.e., wherein

₀(r)=p₀(r)), such that equation (5) above is reduced to:I ₀(r)=|

_(z)(r)|²   (6)which represents the diffraction pattern of the binary mask p₀(r). Themeasurement image is captured under distorted illumination f₀(r), suchthat equation (5) above is reduced to:I ₀(r)=|

_(z)(r−z∇ϕ(r))|² =I ₀(r−z∇ϕ(r))   (7)

In this way, the local slope ∇ϕ(r) is encoded in the diffraction patternimage pair I₀(r) and I(r), which can be solved in a number of differentways. For example, in one embodiment decoding involves utilizing asimple least squares method linearized around r (as described below). Inanother embodiment, an iterative nonlinear least squares updating usingwarping theory. After getting the wavefront slope ∇ϕ(r), the unknownwavefront φ(r) can then be reconstructed by integrating over thepreviously obtained slopes.

In some embodiments, however, the distance

is unknown and the displacements in the diffraction images pair dependon the physical scale of r. Therefore, under these conditions thereconstructed wavefront ϕ(r) can only be determined up to a scaledconstant. In this embodiment, to correctly retrieve the wavefront ϕ(r),there is an additional constant that needs to be computed. One method ofcomputing this scaling constant is to determine empirically in a leastsquares sense over all the wavefront samples against the ground truthwavefront (described in more detail below). In this way, the CSHwavefront sensor is regarded as a first-order sensing methods.

To numerically decode the hidden phase information of the CSH wavefrontsensor, equation (7) is further linearized around r, as follows:I(r)−I ₀(r)≈z(∇I ₀(r)^(T)∇ϕ(r)   (8)which represents the final image formation model that contains thewanted phase information ϕ(r). In this embodiment, phase informationϕ(r) is solved for directly. A benefit of this approach is that it takesadvantage of the curl-free property of the flow, and allows for solvinga joint optimization problem simultaneously.

In one embodiment, the decoding operation formulates the wavefrontretrieval problem in discrete form. In this embodiment, let the totalsensor pixel number be M, and the unknown wavefront φϵ

^(N), where N>M includes unobserved boundary values. By defining imagegradient fields g_(x) ϵ

^(M) and g_(y) ϵ

^(M) as the average x and y gradients of the reference image andmeasured image, and g_(t) ϵ

^(M) as the temporal gradient between the two, a concatenated matrixG=[diag(g_(x))diag(g_(y))] ϵ

^(M×2M) is obtained, where diag(⋅) denotes the diagonal matrix formed bythe corresponding vector. The gradient operator is defined as ∇=[∇_(x)^(T)∇_(y) ^(T)]^(T):

^(N)→

^(2N) where ∇_(x) and ∇_(y) are discrete gradient operators along x andy directions respectively. With a binary diagonal matrix M₀ ϵ

_({0,1}) ^(2M×2N) denoting the measurement positions, and define

M = [ M o 0 0 M o ] ∈ { 0 , 1 } 2 ⁢ M × 2 ⁢ N , we ⁢ ⁢ have ⁢ : ⁢ ⁢ minimize ϕ ⁢ GM ⁢ ∇ ϕ + g t  2 2 + α ⁢  ∇ ϕ  2 2 , ( 9 )where the classical Horn-Schunck intensity consistency term is imposed,with a regularization term on the phase smoothness. The parameter α>0 isa tradeoff parameter between the two terms. Exploiting proper splittingstrategy, Eq. (9) can be efficiently solved using Alternating DirectionMethod of Multipliers (ADMM).

In one embodiment, a slack variable w ϵ

^(2N) is introduced to allow the original object function shown in Eq.(9) to be split into two parts, represented as:

$\begin{matrix}{{{\underset{\phi,w}{minimize}\mspace{14mu}{f(\phi)}} + {g(w)}},{{{subject}\mspace{14mu}{to}\mspace{14mu} w} = {\nabla\phi}}} & (10)\end{matrix}$where the two functions f(⋅)- and g(⋅) are defined as:f:

^(N) →

f(φ)=α∥∇ϕ∥₂ ²g:

^(2N) →

g(w)=∥GM∇ϕ+g _(t)∥₂ ², with w|=∇φ

Using the Alternating Direction Method of Multipliers (ADMM) yieldsAlgorithm (1), where ζϵ

^(2N) is the dual variable. The updating of ϕ and w may be computedusing the ADMM as follows:

Algorithm 1. ADMM for solving Eq. (10)   1: Initialize w⁰ and ζ⁰, setλ > 0 and K 2: for k = 0, 1, . . . , K − 1 do 3:   $\left. \phi^{k + 1}\leftarrow{{\arg\;{\min\limits_{\phi}{f(\phi)}}} + {\frac{1}{2\;\lambda}{{{\nabla\phi} - w^{k} + \zeta^{k}}}_{2}^{2}}} \right.$4:   w^(k+1) ← prox_(λg)(∇ϕ^(k+1)ζ^(k)) 5:   ζ^(k+1) ← ζ^(k) + ∇ϕ^(k+1)− w^(k−1) 6: return ϕ^(K)

(i) The φ-Update Step

In one embodiment, the ϕ-update step (wavefront estimation) involvessolving a Poisson equation, which usually requires proper boundaryconditions in conventional approaches. However, in one embodiment,because of the existence of M, the unknown boundary values (i.e. thenon-zero elements of (I−M₀ ^(T)M₀)ϕ, where I is identity matrix) areimplicitly determined by minimizing the objective. When trivial boundaryconditions are assumed, the resultant Poisson equation solution leads tonon-trivial boundary values on the observed part of wavefront φ, whichallows for the estimation M₀ϕ. In some embodiments, the Neumann boundarycondition suffices to yield a good estimation constrained to smallestpossible N. In these embodiments, by just assuming Neumann boundarycondition on the linear operators, denoting

_(DCT) and

Y_(DCT) ⁻¹ as forward and inverse Discrete Cosine Transforms (DCT)respectively, ϕ-update is given by:

$\begin{matrix}\begin{matrix}{\phi^{k + 1} = {{\arg\;{\min\limits_{\phi}\;{\alpha{{\nabla\phi}}_{2}^{2}}}} + {\frac{1}{2\lambda}{{{\nabla\phi} - w^{k} + \zeta^{k}}}_{2}^{2}}}} \\{= {\left( {\left( {{2\lambda\;\alpha} + 1} \right)\nabla^{2}} \right)^{- 1}{\nabla^{T}\left( {w^{k} + \zeta^{k}} \right)}}} \\{= {\mathcal{F}_{DCT}^{- 1}\left( \frac{\mathcal{F}_{DCT}\left( {\nabla^{T}\left( {w^{k} + \zeta^{k}} \right)} \right)}{\left( {{2\lambda\;\alpha} + 1} \right){\mathcal{F}_{DCT}\left( \nabla^{2} \right)}} \right)}}\end{matrix} & (11)\end{matrix}$where the division is element-wise. Note that forward/inverse DCT can beefficiently implemented via forward/inverse Fast Fourier Transforms(FFT), respectively.

(ii) w-Update Step

In one embodiment, the w-update step (slack variable) involves theevaluation of prox_(λg)(u), the proximal operator of g(w) with parameterλ, which is defined and computed as:

$\begin{matrix}\begin{matrix}{{{prox}_{\lambda\; g}(u)} = {{\arg\;{\min\limits_{w}{{{GMw} + g_{t}}}_{2}^{2}}} + {\frac{1}{2\lambda}{{w - u}}_{2}^{2}}}} \\{= {\left( {I + {2\lambda\; M^{T}G^{T}{GM}}} \right)^{- 1}\left( {u - {2\;\lambda\; M^{T}G^{T}g_{t}}} \right)}} \\{= {{{M^{T}\left( {I + {2\lambda\; G^{T}G}} \right)}^{- 1}\left( {{Mu} - {2\lambda\; G^{T}g_{t}}} \right)} +}} \\{\left( {I - {M^{T}M}} \right)u}\end{matrix} & (12)\end{matrix}$wherein I+2λG^(T)G is diagonal in blocks and whose inverse is alsodiagonal in blocks and in closed-form, so is prox_(λg)(u). In thisembodiment, the computation of prox_(λg)(u) is element-wise. In oneembodiment, to suppress noise, a median filtering is imposed to thefinal gradient estimation. In one embodiment, the estimated wavefrontϕ_(estimate) is computed by solving Eq. (11), with median filtered(w^(K)+ζ^(K)). In this embodiment, M₀ϕ_(estimate) is used as the finaloutput wavefront.

One of the benefits of the described decoding process is the ability toexecute the decoding process in a highly efficient and parallelizablemanner For example, the update step described above exploits FastFourier Transform (FFT) operations, element-wise operation, or simpleconvolutions. In addition, in one embodiment processing system 106(shown in FIG. 1) utilizes GPU to perform the FFT operations. In oneembodiment, the CUDA and CuFFT library is utilized to execute FFToperations, and the unknown size N is set to a power of two. Given theactual pixel number M, the unknown size N can be defined arbitrarily aslong as N>M, and hence is well suited for numerical implementations. Inone embodiment, utilization of N−M˜10 is utilized, although in otherembodiment other value of N may be utilized.

Several of the parameters described above may be modified, with eachmodification affecting the subsequent influence on the convergence speedof the decode algorithm For example, in one embodiment the proximalparameter λ determines, at least in part, the convergence speed of theADMM algorithm shown in FIG. 5.

FIG. 3 illustrates the capture of a planar/reference wavefront image, adistorted/measurement wavefront image, and the difference between thereference wavefront image and the measurement wavefront image. Inparticular, the images on the left illustrate a captured referenceimage, wherein the top portion illustrates the entire captured image andthe bottom portion illustrates a magnified view of the top portion. Theimages in the center illustrate a captured measurement image, whereinthe top portion illustrates the entire captured image and the bottomportion illustrates a magnified view of the top portion. The images onthe right illustrate the difference between the captured reference imageand the captured measurement image. The difference between the referenceimage and the measurement image illustrates the local shifting of thediffraction pattern as a result of the distorted wavefront. In this way,FIG. 3 illustrates the necessity of capturing a reference image based ona planar wavefront in order to prepare the wavefront sensor for capture.

FIG. 4 illustrates fabrication of a binary mask utilized by thewavefront sensor according to an embodiment of the present invention. Atstep 400, mask pattern 402 is written to a first side of photomask 404.In this embodiment, photomask 404 is a Soda Lime photomask, but in otherembodiments various other well-known types of photomasks may beutilized. In addition, in this embodiment a laser direct writer isutilized to write mask pattern 402 onto the first side of photomask 404.

At step 406, a thin layer 408 is deposited onto a side of wafer 410. Inthe embodiment shown in FIG. 4, thin layer 408 is a chromium (Cr) layeris deposited onto a translucent substrate 410. In one embodiment,translucent substrate 410 is a fused silica wafer, but in otherembodiments other types of translucent substrates could be utilized. Inone embodiment, the translucent substrate may be completely transparent.

At step 412, a uniform photoresist layer 414 is deposited on top of thethin layer 408. In one embodiment, a spin-coating method is utilized todeposit the photoresist layer onto thin layer 408.

At step 416, wafer 410 is aligned with photomask 404 on a contactaligner and the photoresist layer 414 is exposed to UV light. Dependingon the type of photoresist layer utilized (positive or negative), eitherthe areas exposed to UV light become soluble to the photoresistdeveloper or the areas exposed to the UV light become insoluble to thephotoresist developer.

At step 418, a development solution is utilized to either remove areasexposed to UV light at step 416 or remove areas unexposed to UV light atstep 416.

At step 420, an etching process is utilized to etch portions of thinlayer 408. Having etched the exposed portions of thin layer 408,remaining photoresist is removed, leaving the final binary mask formedon fused silica wafer 410.

Accuracy of a proposed Coded Shack-Hartmann wavefront sensor is providedbased on experimental results. The experimental setup relies ongeneration of a plurality of different target wavefronts. In thisembodiment, target wavefronts are generated using a reflectiveLCoS-based Spatial Light Modulator (SLM) (e.g., PLUTO SLM by HOLOEYE)having a pixel pitch of approximately 8 μm, and the maximum phaseretardation of 2π. For collimated illumination, a faraway white pointlight source is employed, along with a polarizer placed in the opticalpath to allow for phase-only modulation of the SLM. A beamsplitter isemployed, along with a Kepler telescope configuration utilized to ensurethe SLM and wavefront sensor are in conjugate, to ensure that thedistorted wavefront measured by the CSH wavefront sensor is the oneproduced by the SLM. In this experiment, the Kepler telescope iscomposed of two lenses, with focal lengths of 100 mm and 75 mm,respectively. The sensor exposure time is set to be 5 ms in bothcalibration and measurement steps.

Using the above mentioned optical setup, four types of wavefront sampleswere generated and acquired, each with a series of different scales: (i)cubic phases, (ii) spherical phases, (iii) single-mode Zernike phases,and (iv) customized Zernike phases. Each of these wavefronts areanalyzed to determine how parameters may be tuned to measure and detectthe desired wavefront, as well as the tradeoff expected betweenexecution time and accuracy of the detected wavefront.

Tuning of Proximal Parameter λ

FIG. 5 is a graph indicating how proximal parameter λ affectsconvergence of the algorithm according to an embodiment of the presentinvention. Tuning of proximal parameter λ determines the convergencespeed of the ADMM algorithm. In one experiment, proximal parameter λ isevaluated for a fixed iteration number K=20, using the sphericalwavefront data. Results are provided in FIG. 5, in which a plurality ofvalues of proximal parameter λ are evaluated. As illustrated in FIG. 5,a large value of proximal parameter λ makes the problem stiff andtherefore convergences slowly, while a smaller value of proximalparameter λ slows the convergence when iterations increase because of alack of constraint. In this experiment, a suitable choice of proximalparameter λ lies in the range of (0.002, 0.02), with a value of λ=0.01being utilized herein.

Tradeoff Between Time and Accuracy

In addition to the proximal parameter 2, there is also a tradeoffbetween time and accuracy of the decoding algorithm. For example, tosuppress noise, a median filtering on the estimated gradients is imposedat the last step. In practice, a median filtered final gradientestimation could indeed benefit for a smoother reconstructed wavefront.In addition, lower energy, in this case in the form of a large number ofiterations and more computation time, does not equivalently yield betterresults. On the other hand, the original energy function may notconverge sufficiently if given inadequate number of iterations.Consequently, it is necessary to investigate the tradeoff between timeand accuracy. In one embodiment, a value of K=10 yields a good tradeoff.

Scaling Constant

As mentioned before, a scaling constant is also computed. In oneembodiment, the scaling constant is determined by way of (i) meannormalization on the reconstructed wavefront; (ii) comparing with groundtruth and determining a suitable scaling constant for each pixelposition, (iii) getting the median as the scaling constant for eachindividual wavefront reconstruction, (iv) and obtaining the finalscaling constant as the mean of the medians in step (iii). In oneembodiment, an estimation for the scaling constant is set to 0.25.

FIG. 6 are graphs that illustrate the accuracy of the CSH wavefrontsensor according to an embodiment of the present invention. The topgraph illustrates mean absolute error of all sample wavefronts. Thebottom graph illustrates average angular error of all the samplewavefront gradients. As illustrated in the top graph, for most wavefrontsamples, the mean absolute error is less than 0.1 wavelengths, which is˜50 nm if monochromatic green light is considered. This illustrates thatthe CSH wavefront sensor is highly sensitive.

In addition to good error performance, the CSH wavefront sensor providesefficient run-time operation. In one embodiment, the run-time of thewavefront reconstruction algorithm is mainly reduced by reducing therequired number of iterations. For example, in one embodiment the firstiteration or update of the wavefront ϕ may be skipped when slackvariable w⁰ and ζ⁰ are set to zero vectors.

The present invention provides a wavefront sensor utilized to measurethe phase of distorted wavefronts. In one embodiment, the wavefrontsensor described herein as a Coded Shack-Hartmann wavefront sensorutilizes in a foreground mask that is utilized to modulate the incomingwavefront at diffraction scale. The resulting wavefront information isencoded by the diffraction pattern, and is numerically decoded by awavefront reconstruction algorithm that relies on a simple optimizationmethod. In this way, the Coded Shack-Hartmann wavefront sensor provideshigher pixel utilization, full sensor resolution wavefrontreconstruction, and efficient parallel computation and real-timeperformance as compared with traditional wavefront sensors such as thetraditional Shack-Hartmann wavefront sensor.

While the invention has been described with reference to an exemplaryembodiment(s), it will be understood by those skilled in the art thatvarious changes may be made and equivalents may be substituted forelements thereof without departing from the scope of the invention. Inaddition, many modifications may be made to adapt a particular situationor material to the teachings of the invention without departing from theessential scope thereof. Therefore, it is intended that the inventionnot be limited to the particular embodiment(s) disclosed, but that theinvention will include all embodiments falling within the scope of theappended claims.

The invention claimed is:
 1. A wavefront sensor comprising: a foregroundmask that modulates an incoming wavefront to create a diffractionpattern, wherein the foreground mask is a uniform random binary mask;and a sensor located behind the foreground mask that captures thediffraction pattern generated as a result of modulation of the incomingwavefront by the foreground mask.
 2. The wavefront sensor of claim 1,wherein the foreground mask is located a distance

in front of the sensor.
 3. The wavefront sensor of claim 2, wherein thedistance

is selected based on the application to create a desired diffractionpattern.
 4. The wavefront sensor of claim 2 wherein the distance

has a range of between 0.1 millimeters to 3.0 millimeters.
 5. Thewavefront sensor of claim 1, further comprising: a processor configuredto compare a diffraction pattern of a reference image captured inresponse to a planar wave incident on the sensor with a diffractionpattern of a measurement image captured in response to a distortedwavefront incident on the sensor.
 6. The wavefront sensor of claim 5,wherein the processor measures local sub-pixel shifts between thereference image and the measurement image and utilizes these localsub-pixel shifts to detect local slopes of the distorted wavefront.